package com.wzt.lianfirecontrol.bean;

import android.content.Context;
import android.os.Environment;

import androidx.annotation.NonNull;

import com.wzt.lianfirecontrol.App;
import com.wzt.lianfirecontrol.utils.Utils;

public class ConstData {

    public static final boolean INNER = false;

    public static final int NO_NET_WHAT = -1;
    public static final String URL_ERROR_MSG = "网络请求失败";
    public static final String NET_LINKED_ERROR_MSG = "网络请求失败";
    public static final String ERROR_COMPANY_MSG = "不是自己单位，无法操作";
    //======================日期格式======================

    public static final String TIME_FORMAT_YYYY_MM_DD = "yyyy-MM-dd";
    public static final String TIME_FORMAT_YYYYMMDD = "yyyyMMdd";
    public static final String TIME_FORMAT_YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";
    public static final String TIME_FORMAT_YYYY_MM_DD_HH_MM = "yyyy-MM-dd HH:mm";
    public static final String TIME_FORMAT_YYYYMMDDHHMMSS = "yyyyMMddHHmmss";
    /**
     * 用户信息
     */
    public static final String USERINFO = "userInfo";
    public static final String COMPANYID = "companyId";
    public static final String REPAIRCOMPANYID="repairCompanyId";
    public static final String COMPANYNAME = "companyName";
    public static final String USERTOKEN = "userToken";
    public static final String USERACCOUNT = "userAccount";
    public static final String USERPASSWORD = "userPassword";
    /**
     * 页面传递关键字
     */
    public static final String URL = "url";
    public static final String PAGETYPE = "pageType";
    public static final String BARTYPE = "barType";
    public static final String BJPAGETYPE = "bjPageType";
    public static final String JSONOBJECT = "jsonObject";
    public static final String ISDEVICECOMPLETE = "isDeviceComplete";
    /**
     * action
     */
    public static final String ACTIONMODLE = "actionModel";
    public static final String ACTIONTITLE = "actionTitle";
    public static final String ACTIONTYPE = "actionType";
    public static final String ACTIONVALUE = "actionValue";
    public static final String ACTIONPARAMS = "actionParams";
    /**
     * 页面跳转动作类型
     */
    public static final String WEB = "web";
    public static final String WEB_CAD = "webCad";
    public static final String SQCODE = "sqCode";
    public static final String PHONE = "phone";
    public static final String PAGE_PATH = "pagePath";
    public static final String SHOWFRAG = "showFrag";
    /**
     * showFragActivit页面类型
     */
    public static final String INFOLIST = "infoList";
    public static final String MESSAGEDETAIL = "messageDetail";
    public static final String BAOJINGDETAIL = "baoJingDetail";
    public static final String BARTITLE = "barTitle";
    public static final String BARFLOOR = "barFloor";
    public static final String BARSELECT = "barSelect";
    public static final String CHANGEINFO = "changeInfo";
    public static final String SETTING = "setting";
    public static final String MYTEAM = "myTeam";
    public static final String CONTACTKEFU = "contactKeFu";
    public static final String ADVICEBACK = "adviceBack";
    public static final String DUTYLIST = "dutyList";
    public static final String DUTYDETAIL = "dutyDetail";
    public static final String ADDUNUSUAL = "addUnusual";
    public static final String UNUSUALDETAIL = "unusualDetail";
    public static final String DUTYHISTORY = "dutyHistory";
    public static final String FUHEDETAIL = "fuheDetail";
    public static final String WUBAO = "wubao";
    public static final String STARTXUNCHA = "startXunCha";
    public static final String XUNCHADETAIL = "xunChaDetail";
    public static final String XUNCHADEVICEDETAIL = "xunChaDeviceDetail";
    public static final String XUNCHHISTORY = "xunChaHistory";
    public static final String XUNCHACOMPLETE = "xunChaComplete";
    public static final String ADDXUNCHAQES = "addXunChaQes";
    public static final String ADDXUNCHADETAILQES = "addXunChaDeviceQes";
    public static final String ALARM = "alarm";
    public static final String YUYUEDETAIL = "yuyueDetail";
    public static final String ADDYUYUE = "addYuYue";
    public static final String JINJIDETAIL = "jinjiDetail";
    public static final String ADDJINJI = "addJinJi";
    public static final String YINGHUANDETAIL = "yingHuanDetail";
    public static final String ADDYINGHUAN = "addYingHuan";
    public static final String XFTD = "xftd";
    public static final String VIDEO = "video";
    public static final String ADDYUYUERECORD = "addYuYueRecord";
    public static final String ADDYINGHUANRECORD = "addYingHuanRecord";
    public static final String EVALUATE = "evaluate";

    /**
     * infoList类型
     */
    public static final String SHOWTYPPE = "showType";
    public static final String MESSAGELIST = "messageList";// 消息列表
    public static final String UNUSUALLIST = "unusualList";// 异常列表
    public static final String YINGHUAN = "yinghuan";// 隐患整改
    public static final String JINGJI = "jingji";// 紧急维修单
    public static final String YUYUE = "yuyue";// 预约维保
    public static final String BAOJING = "baojing";// 紧急维修单
    public static final String XUNCHA = "xuncha";// 巡查
    public static final String XUNCHAITEM = "xunchaItem";// 巡查项
    public static final String XUNCHAQUESTION = "xunchaQuestion";// 防火巡查问题
    public static final String XUNCHADEVICEQUESTION = "xunchaDeviceQuestion";// 设备巡查问题
    public static final String LOCATIONLIST = "locationList";// 系统楼栋列表
    public static final String DEVICELIST = "deviceList";// 设备列表
    public static final String JIANKONGBUILDLIST = "jianKongBuildList";// 监控楼栋列表
    public static final String JIANKONGDEVICELIST = "jianKongDeviceList";// 监控设备列表
    public static final String XKSVIDEOLIST = "xksVideoList";// 消控室监控设备列表
    public static final String WEIBAOPERSON = "weiBaoPerson";// 维保人员
    public static final String DEVICEVIDEOLIST = "deviceVideoList";// 设备监控设备列表
    public static final String HOME_BAOJING_DEVICE_LIST = "home_baojing_device_list";// 首页报警设备列表

    /**
     * 请求列表参数
     */
    public static final String PAGEINDEX = "page";
    public static final String PAGESIZE = "size";
    public static final String PAGE_20 = "10";
    /**
     * 拍照返回请求
     */
    public static final int PHOTO_CHANG_USER = 0;
    public static final int PHOTO_DEVICE_LIST_1 = 1;
    public static final int PHOTO_DEVICE_LIST_2 = 2;
    public static final int PHOTO_DEVICE_LIST_3 = 3;
    public static final int PHOTO_USER_SIGN = 4;

    public static final int DELE_IMG_WHAT = 999;
    public static final int COMMIT_IMG_WHAT = 10000;
    /**
     * 存储在PreferenceUtils中报警语音状态 0关闭 1开启
     */
    public static final String SWITCH_BAOJING_STATUS = "switch_baojing_status";
    /**
     * 存储在PreferenceUtils中故障语音状态 0关闭 1开启
     */
    public static final String SWITCH_GUZHANG_STATUS = "switch_guzhang_status";
    /**
     * 存储在PreferenceUtils中监管语音状态 0关闭 1开启
     */
    public static final String SWITCH_JIANGUAN_STATUS = "switch_jianguan_status";

    /**
     * 存储在PreferenceUtils中预警语音状态 0关闭 1开启
     */
    public static final String SWITCH_YUJING_STATUS = "switch_yujing_status";
    /**
     * 存储在PreferenceUtils中误报成功状态 0需要刷新 1不需要
     */
    public static final String WUBAOREFRESH = "wubaorefresh";
    /**
     * 存储在PreferenceUtils中异常上报成功状态 0需要刷新 1不需要
     */
    public static final String YICHANGREFRESH = "yichangrefresh";
    /**
     * 存储在PreferenceUtils中刷新 0需要刷新 1不需要
     */
    public static final String NEEDREFRESH = "needrefresh";
    /**
     * 存储在PreferenceUtils中刷新 0需要刷新 1不需要
     */
    public static final String NEEDFUHEREFRESH = "needfuherefresh";
    /**
     * 存储在PreferenceUtils中设备状态
     */
    public static final String DEVICESTATUSLIST = "deviceStatusList";
    /**
     * 存储在PreferenceUtils中拍照路径
     */
    public static final String PHOTOPATH = "photoPath";
    /**
     * 存储在PreferenceUtils中修改后手机号码
     */
    public static final String CHANGEDPHONE = "changedPhone";
    /**
     * 存储在PreferenceUtils中整改状态变化 0整改中 1带整改
     */
    public static final String CHANGESTATUS = "changeStatus";
    /**
     * 存储在PreferenceUtils中显示结束弹窗 0需要刷新 1不需要
     */
    public static final String NEEDNFCDIALOGSHOW = "neednfcdialogshow";
    /**
     * 存储在PreferenceUtils中显示更新弹窗
     */
    public static final String UPDATE_DIALOG_SHOW = "update_dialog_show";

    /**
     * 值班室详情图片控件类型
     */
    public static final String IMG_TYPE_STATUS = "img_type_status";


    /**
     * 拍照存放地址
     */
    public static final String PLAY_PHOTO_LOCATION = Environment.getExternalStorageDirectory() + "/ZhiAn/playPhoto";
    /**
     * 保存错误日志到sd卡中
     */
    public static final String LOG_LOCATION = Environment.getExternalStorageDirectory() + "/LianFire/logs/";

    /**
     * 版本更新app存储路径
     */
    public static String getMyAppDownloadPath(@NonNull Context context, String version) {
        try {
            return context.getExternalFilesDir("LianFire").getAbsolutePath() + "/lianfire" + version + ".apk";
        } catch (Exception e) {
            StringBuilder sb = new StringBuilder();
            sb.append("/sdcard/Android/data/").append(context.getPackageName())
                    .append("/files/").append("LianFire/lianfire").append(version).append(".apk");
            return sb.toString();
        }
    }

    /**
     * 版本更新app存储路径
     */
    public static String getMyAppDownloadPathFile(@NonNull Context context) {
        try {
            return context.getExternalFilesDir("LianFire").getAbsolutePath();
        } catch (Exception e) {
            StringBuilder sb = new StringBuilder();
            sb.append("/sdcard/Android/data/").append(context.getPackageName())
                    .append("/files/").append("LianFire");
            return sb.toString();
        }
    }
    /**
     * 萤石
     */
    public static final String VIDEO_ACCESS_TOKEN = "videoAccessToken";
    public static final String YINGSHI_APPKEY = "a3288cdfa8c54340a8204b4cf49aa7d5";
    public static final String YINGSHI_APPSERCET = "8dad6f1b2efb58eb0ce55ed8a1ac51f5";
    public static final String YINGSHI_GET_ACCESS_URL = "https://open.ys7.com/api/lapp/token/get";


    /**
     * status1报警 2故障 4监管 98预警 6 屏蔽
     */
    public static final String HUOJING_STATUS = "1";// 报警
    public static final String HUOJING_STATUS_TEXT = "火警";
    public static final String GUZHANG_STATUS = "2";// 故障
    public static final String GUZHANG_STATUS_TEXT = "故障";
    public static final String YUJING_STATUS = "98";// 预警
    public static final String YUJING_STATUS_TEXT = "预警";
    public static final String JIANGUAN_STATUS = "4";// 监管
    public static final String JIANGUAN_STATUS_TEXT = "监管";
    public static final String PINGBI_STATUS = "6";// 屏蔽
}
